package com.cn.newetv.utils;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class MySQLiteOpenHelper extends SQLiteOpenHelper {
	public final static int VERSION = 1;
	public final static String TABLE_NAME = "T_SYSTEM_CONFIG";
	public final static String DATABASE_NAME = "etv.db";
	public MySQLiteOpenHelper(Context context) {
		super(context, DATABASE_NAME, null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase sqlitedatabase) {
		sqlitedatabase.execSQL("CREATE TABLE if not exists "+TABLE_NAME+" (paramkey text,paramvalue text);");
	}

	@Override
	public void onUpgrade(SQLiteDatabase sqlitedatabase, int i, int j) {
		sqlitedatabase.execSQL("DROP TABLE if exists "+TABLE_NAME);
		onCreate(sqlitedatabase);
	}

}
